import request from '@/utils/request'

// 封装一个登录的接口
export const loginAPI = (data) => {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    data
  })
}

// 封装一个获取个人资料的接口
export const userInfoAPI = () => {
  return request({
    url: '/v1_0/user/profile'
  })
}

// 封装一个修改个人头像的接口
export const editAvatarAPI = (data) => {
  return request({
    url: '/v1_0/user/photo',
    method: 'patch',
    data
  })
}

// 封装一个修改个人资料的接口
export const editUserInfoAPI = (data) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'patch',
    data
  })
}
